<template>
  <SkillInfo v-if="!isEdit" :data="data" @edit="handleEdit" />
  <SkillEdit v-else :data="editData" @edit="isEdit = false" />
</template>

<script>
import SkillInfo from './SkillInfo'
import SkillEdit from './SkillEdit'
export default {
  name: 'ResumeSkill',
  components: { SkillInfo, SkillEdit },
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      isEdit: false,
      editData: null
    }
  },
  methods: {
    handleEdit(data) {
      this.isEdit = true
      this.editData = data
    }
  }
}
</script>
